#ifndef DATA_MANGE_H
#define DATA_MANGE_H

#include <QWidget>
#include <QSqlDatabase>
#include <QtDebug>
#include <QSqlQuery>
#include <QPushButton>
#include <QVector>
#include <QStringList>
#include <QMessageBox>

namespace Ui {
class data_mange;
}

class data_mange : public QWidget
{
    Q_OBJECT

public:
    explicit data_mange(QWidget *parent = nullptr);
    ~data_mange();

private:
    Ui::data_mange *ui;
    QSqlDatabase sql;
    void set_menu();

    QStringList id_list;
    QStringList sex_list;
    QStringList grade_list;
    QStringList family_list;
    QStringList work_list;
    QStringList edu_list;
    QStringList res_list;

    QString id;
    QString name;
    QString phone;
    int sex;
    int grade;
    int f_w;
    int m_w;
    int f_e;
    int m_e;
    int family;
    int res;
    QString birth_low;
    QString birth_high;
    QString date_low;
    QString date_high;

signals:
    void show_detail(int);
    void want_print(int);

private slots:
    void display_date();
    void get_info();

    void click_check();
    void click_print();
    void click_delete();
};

#endif // DATA_MANGE_H
